﻿@model MSAcademic.v2.Web.Areas.Admin.Models.Picture.EditArticleThumbnailPictureViewModel
@{
    ViewBag.Title = "Uredi malu sliku za " + Model.ArticleId;
}

<script type="text/javascript"> 
    $(function () {
        
        msacademic.initializeJCrop("@Model.ThumbnailPictureHeight" , "@Model.ThumbnailPictureWidth" , $('#croppedUrl'), { 
            minSize: [@Model.ThumbnailPictureWidth,@Model.ThumbnailPictureHeight] 
        });

    });
</script>

<div class="msacademic popup">
    <h2> Uređivanje male slike</h2>
    
    @using(Html.BeginForm())
    {
        @Html.HiddenFor(m=>m.OriginalUrl)
        @Html.HiddenFor(m=>m.ArticleId)
        @Html.HiddenFor(m=>m.CroppedThumbnailPictureUrl,new{Id="croppedUrl"})
    
        <div class="image-cropper"> <img src="@Model.ThumbnailPictureUrl" class="image" id="thumbnailImage"alt=""/> </div>
        
        <div class="actions-wrapper"> 
            <span class="info">Mala slika se koristi kod izlista novosti i pri dijeljenju novosti na društvenim mrežama.</span>

            <a  href="@Url.RouteUrl("UploadArticleFrontPictures", new { articleId = Model.ArticleId })" class="cancel">Odustani</a> 
            <a class="positive submit">Spremi promjene <i class="icon-ok"></i></a> 
        </div>   
    }

</div>


